package com.zr.inquiry.meiju;



/**
 * Created by Administrator on 2019/10/10.
 */

public enum  StatusEnum {
    //未报价，已保存，已提交，已审核，已作废
    WEIBAOJIA(0,"未报价"),YIBAOCUN(1,"已保存"),YITIJIAO(2,"已提交"),YISHENHE(3,"已审核"),YIZUOFEI(4,"已作废");
    private final String statusName;
    private final Integer statusValue;

    public String getStatusName() {
        return statusName;
    }

    public Integer getStatusValue() {
        return statusValue;
    }

    private StatusEnum(Integer statusValue, String statusName)
    {
        this.statusName = statusName;
        this.statusValue = statusValue;
    }

    //通过Name获取Value
    public static Integer getValue(String statusName){
        for (isTaxEnum is: isTaxEnum.values()){
            if(is.getStatusName().equals(statusName)){
                return is.getStatusValue();
            }
        }
        return null;
    }


    //通过Value获取Name
    public static String getName(Integer statusValue){
        for (isTaxEnum is: isTaxEnum.values()){
            if(is.getStatusValue()==statusValue){
                return is.getStatusName();
            }
        }
        return null;
    }
}
